package com.zyf.controller;

import com.zyf.pojo.Users;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MyController {

    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }

    //只有我们的接口中，返回值中存在实体类，他就会被扫描到Swagger
    @PostMapping("/login")
    public Users login(){
        return new Users();
    }
}
